import { request } from '@/utils'

export function list(params) {
  return request({
    url: `/testRecord/page`,
    method: 'get',
    params,
  })
}

export function info(id) {
  return request({
    url: `/testRecord/${id}`,
    method: 'get',
  })
}

export function add(data) {
  return request({
    url: `/testRecord`,
    method: 'post',
    data,
  })
}

export function edit(data) {
  return request({
    url: `/testRecord`,
    method: 'put',
    data,
  })
}

export function del(id) {
  return request({
    url: `/testRecord/${id}`,
    method: 'delete',
  })
}

export function startTest(id) {
  return request({
    url: `/testRecord/startjob/${id}`,
    method: 'put',
  })
}

export function stopTest(id) {
  return request({
    url: `/testRecord/Stopjob/${id}`,
    method: 'put',
  })
}

export function progressInfo(id) {
  return request({
    url: `/testRecord/progressInfo/${id}`,
    method: 'put',
  })
}

export function progressInfoSpecial(params) {
  return request({
    url: `/testRecord/dynamicAlgorithmProgress`,
    method: 'get',
    params,
  })
}

export function startTestSpecial(id) {
  return request({
    url: `/testRecord/startqt/${id}`,
    method: 'get',
  })
}
